<?php

/**
 * fx actions.
 *
 * @package    jiazhang
 * @subpackage fx
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class fxActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {
      $id = (int)$request->getParameter('id',1);
      
      $this->forward404Unless($this->skill = Doctrine::getTable('Skill')->createQuery()->where('id = ?',$id)->andWhere('status > 0')->execute()->getFirst());
      $this->getResponse()->setTitle($this->skill->getTitle());
      $this->recommend_skills = Doctrine::getTable('Skill')->createQuery()->where('status = 2')->limit(4)->orderBy('created_at desc')->execute();
      
  }
}
